<html>
<head><meta charset="utf-8"><title>for the next person bewildered by submodules · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/for.20the.20next.20person.20bewildered.20by.20submodules.html">for the next person bewildered by submodules</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209297671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/for%20the%20next%20person%20bewildered%20by%20submodules/near/209297671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/for.20the.20next.20person.20bewildered.20by.20submodules.html#209297671">(Sep 07 2020 at 13:49)</a>:</h4>
<p>These errors:</p>
<div class="codehilite"><pre><span></span><code>$ x.py check
Updating only changed submodules
Submodules updated in 0.36 seconds
error: failed to read `/home/joshua/rustc2/src/tools/miri/cargo-miri/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
failed to run: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/joshua/rustc2/src/bootstrap/Cargo.toml
$ x.py check
Updating only changed submodules
Updating submodule src/tools/cargo
error: Your local changes to the following files would be overwritten by checkout:
    Cargo.toml
Please commit your changes or stash them before you switch branches.
Aborting
Unable to checkout &#39;126907a7cfccbe93778530e6a6bbaa3adb6c515c&#39; in submodule path &#39;src/tools/cargo&#39;
</code></pre></div>


<p>can be fixed by</p>
<div class="codehilite"><pre><span></span><code>$ git diff --name-only | while read dir; do cd $dir &amp;&amp; git checkout -f HEAD &amp;&amp; cd -; done
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>